package com.uwantsoft.business.service.infrastructure;

/**
 * @author Chuanbao
 */
public interface AppPusher {

    /**
     * which pusher implement is supported for the app device
     * @return which concrete pusher is supported for this device
     */
    public boolean supported(String deviceType);
    /**
     * push message to all apps for the specified device type
     * @param deviceType 1 means android, 2 means ios
     * @param deviceToken which app will receive this message
     * @param message will be pushed to app
     */
    public void pushToSingleDevice(String deviceType,String deviceToken,String message) throws Exception;

    public void pushToGroup(String deviceType,String[] deviceTokens,String message) throws Exception;

    public void pushToTag(String deviceType,String tag,String message) throws Exception;
}
